﻿<div class="page-content">
    <form name="editCarForm" novalidate class="form-horizontal" ng-submit="editCar()">
        <div class="page-header position-relative">
            <h1>New Product
                <div class="pull-right">
                    <button type="button" class="btn btn-danger btn-small" ng-click="navigateBack()">
                        <i class="icon-reply icon-only"></i>
                        Back
                    </button>
                    <button type="button" class="btn btn-primary btn-small"
                            ng-hide="editMode"
                            ng-click="switchToEditMode()">
                        <i class="icon-pencil icon-only"></i>
                        Edit
                    </button>
                    <button type="button" class="btn btn-primary btn-small"
                        ng-show="editMode" ng-click="cancelEdit()">
                        Cancel
                    </button>
                    <button type="submit" class="btn btn-primary btn-small"
                        ng-show="editMode"
                        ng-disabled="disableEditBtn()">
                        <i class="icon-save icon-only"></i>
                        Save
                    </button>
                </div>
            </h1>
        </div>
        <div class="row-fluid">
            <div class="span12">
                <!--PAGE CONTENT BEGINS-->
                
                <div class="span6">
                    <div class="control-group">
                        <label class="control-label" for="name">Enter Name</label>

                        <div class="controls">
                            <input type="text" ng-readonly="!editMode"
                                required name="name" id="name" ng-model="car.Name" placeholder="Name" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="brandname">Brand Name</label>

                        <div class="controls">
                            <select id="brandname" ng-disabled="!editMode" name="brandname" ng-model="car.Specification.BrandName"
                                    ng-options="b for b in carBrand" required>
                                <option value="">Select Brand Name</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="type">Type</label>

                        <div class="controls">
                            <select id="type" name="type" ng-disabled="!editMode" ng-model="car.Specification.CarType"
                                    ng-options="t for t in carTypes" required>
                                <option value="">Select Car Type</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="condition">Condition</label>

                        <div class="controls">
                            <input type="text" ng-readonly="!editMode"
                                 required name="condition" id="condition" ng-model="car.Specification.VehicleCondition"
                                   placeholder="Hint: Used, New etc." />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="color">Color</label>

                        <div class="controls">
                            <input type="text" ng-readonly="!editMode"
                                required name="color" id="color" ng-model="car.Specification.Color"
                                   placeholder="Enter Color" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="model">Model</label>

                        <div class="controls">
                            <input type="text" ng-readonly="!editMode"
                                required name="model" id="model" ng-model="car.Specification.Model"
                                   placeholder="Enter Model" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="price">Price</label>

                        <div class="controls">
                            <input type="text" ng-readonly="!editMode"
                                required name="price" id="price" ng-model="car.Price"
                                   name="price"
                                   required
                                   ng-pattern="/^[0-9]{1,15}(\.[0-9]+)?$/"
                                   placeholder="Enter Price" />
                            <span ng-show="editCarForm.price.$error.pattern">Not valid</span>
                        </div>
                    </div>
                </div>
                <div class="span6">
                    <div class="span1">
                        <button class="btn btn-warning btn-small">
                            <i class="icon-plus bigger-110 icon-only"></i>
                        </button>
                    </div>
                    <div class="span6">
                        <input type="file" input-file-uploader>
                    </div>

                </div>
                <div class="hr"></div>

            </div>
            <!--/.span-->
        </div>
        <!--/.row-fluid-->
    </form>
</div>
<!--/.page-conten-->
